package o;

import android.content.Context;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.InputStream;
import o.vk.c;

public class wb implements vk<Uri, InputStream> {
    private final Context ˏ;

    public static class d implements vr<Uri, InputStream> {
        private final Context ˏ;

        public d(Context context) {
            this.ˏ = context;
        }

        @NonNull
        public vk<Uri, InputStream> ˏ(vo voVar) {
            return new wb(this.ˏ);
        }

        public void ॱ() {
        }
    }

    @Nullable
    public /* synthetic */ c ˎ(@NonNull Object obj, int i, int i2, @NonNull sc scVar) {
        return ˏ((Uri) obj, i, i2, scVar);
    }

    public wb(Context context) {
        this.ˏ = context.getApplicationContext();
    }

    @Nullable
    public c<InputStream> ˏ(@NonNull Uri uri, int i, int i2, @NonNull sc scVar) {
        if (sx.ˊ(i, i2) && ॱ(scVar)) {
            return new c(new aai(uri), sv.ॱ(this.ˏ, uri));
        }
        return null;
    }

    private boolean ॱ(sc scVar) {
        Long l = (Long) scVar.ॱ(xf.ॱ);
        return l != null && l.longValue() == -1;
    }

    public boolean ˋ(@NonNull Uri uri) {
        return sx.ॱ(uri);
    }
}
